#ifndef GAME_H
#define GAME_H

#include <iostream>
#include <vector>

#include "movables.h"
#include "digdug.h"
#include "monster.h"
#include "global_variables.h"

using namespace std;


class Game
{
public:

	
	Game (vector<vector<int>> &_level_data);
	Game ();
	void update(Direction dir);

	//DONT FORGET TO MAKE THESE PRIVATE AGAIN!!!!
	Digdug _dig_dug;

	Direction get_object_direction (int object_count);
	bool is_sand_at (int i, int j);
	int get_number_of_objects();

	int get_object_x(int object_count);
	int get_object_y(int object_count);
	int get_object_border(int object_count);
	
	
	ALLEGRO_BITMAP * get_object_bitmap(int object_count);
	
	Rules move_object(Digdug &movable, Direction dir);

//object_x = thisgame.get_object_x(i);
//object_y = thisgame.get_object_y(i);
//object_border = thisgame.get_object_border(i);
//object_bitmap = thisgame.get_object_bitmap(i);

private:
	
	
	vector<vector<Movable_type>> _screen_map;
	

	void game_loop();
	void init_game(vector<vector<int>> &_level_data);
		
	
	void populate_map(vector<vector<int>> &_level_data);
	void init_game();

	vector<vector<Movable_type>> generate_default_map();

};

#endif